#include<stdio.h>
#include<stdlib.h>
int main()
{
   FILE * file = fopen("bite", "w+");
   if (file == NULL)
   {
     perror("fopen error!\n");
     return 1;
   }
   char  buff[] = "linux so easy!";
   //写入内容
   fwrite(buff, sizeof(char), sizeof(buff), file);
   // 重置文件指针到文件开头
   fseek(file, 0, SEEK_SET);
   //读出文件的内容
   char buffer[100] = { 0 };
   fread(buffer, sizeof(char), sizeof(buff), file);
   printf("%s\n", buffer);
   //关闭文件
   fclose(file);
   return 0;
 }

